﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ParamTypeManage.aspx.cs" Inherits="DataBase_ParamTypeManage" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>基础数据类别</title>
 <link rel="stylesheet" href ="../css/css.css" type="text/css" />
    <!--#include file="../Js/Button.js"-->
    <script src="../Js/Common.js" type ="text/javascript"></script>
    <script src="../Js/calendar.js" type ="text/javascript"></script>
    <script language ="javascript" type ="text/javascript" >
  function document.onkeydown()     
  {
      var   e=event.srcElement; 
      if(event.keyCode==13)
      {
         return   false; 
      }
  }  

  function EditClick(type)
    {
        var sFeatures = "dialogHeight:220px;dialogWidth:400px;resizeable:no;help:no;status:no";
        switch (type)
        { 
             case 1://增加                                
                    showModalDialog("ParamTypeEdit.aspx?EditStatus=1",window,sFeatures);
				    var btnRefresh= document.getElementById("BtnRefresh");
				    if(btnRefresh!=null)
				       btnRefresh.click();
                    break;
             case 2://修改
                    var HiddenID=document.getElementById('HiddenID').value;
                    if(isNull(HiddenID))
                    {
                        alert("请选择一条记录!");
                        return false;
                    }
                    showModalDialog("ParamTypeEdit.aspx?EditStatus=2&ID=" + HiddenID,window,sFeatures);
				    var btnRefresh= document.getElementById("BtnRefresh");
				    if(btnRefresh!=null)
				       btnRefresh.click();
                    break;
          }          
     }
    
    </script>
    
    
</head>
<body style =" background-image :url('../images/hit_bg.gif');"> 
    <form id="form1" runat="server">
    <div>
<table style ="width :98%;"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
   <td valign ="middle"  style ="height :25; width :100%;" ><img id="imgIndicator" src ="../images/Indicator.gif" style ="width :21; height :16;" alt ="当前位置" />当前位置：<asp:Label ID="Indicator" runat ="server" ></asp:Label></td>
   </tr> 
  <tr style ="height :1; background-color :#dddddd;">
    <td></td>
 </tr> 
</table>            
<table style ="width :98%;"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr style ="height :5;">
    <td></td>
 </tr> 
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="table" align="center" >
  <tr> 
    <td colspan="6" align="center" valign="top">
     <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" >
      <tr> 
        <td colspan="6" align="center" valign="top">   
         <table width="100%" border="0" align="center"  cellpadding="0" cellspacing="0">
          <tr>
           <td>
		     名称：<asp:TextBox ID="Name" runat="server"  TabIndex="3" Width="120"></asp:TextBox>
             <asp:Button ID="btnSearch" runat="server" CssClass ="button03"  Text="查询" />
            </td>
            <td style ="width:200;">
             <!--按钮开始-->     
                  <table cellpadding="0" cellspacing="0" width="95%" align="center">
                    <tr>
                        <td align="right" style="height: 32px;" nowrap="nowrap">
                            <asp:Label ID="LabMessage" runat="server" ForeColor="Red"></asp:Label>
                            <input type="hidden" id="HiddenID" name="HiddenID" runat="server" />
                            <input type="hidden" id="HiddenWidth" name="HiddenWidth" value = "300"  runat="server" />
                            <input type="hidden" id="HiddenHeight" name="HiddenHeight" value="200"  runat="server" />
                            <input id="btnAdd" type="button" onclick="EditClick(1)" value="增加" class="button03" />
                            <input id="btnEdit" runat="server" type="button" value="修改"  class="button03" onclick="EditClick(2)"  />
                            <asp:Button ID="btnDelete" runat="server" CssClass="button03" Height="22px" Text="删除" />
                            <asp:Button ID="btnRefresh" runat="server" Text="Button" Width="0px" Height="0px" OnClick="btnRefresh_Click" />
                        </td>
                    </tr>
                </table>
               <!--按钮结束--> 
            </td>
           </tr>
          </table> 
         </td> 
       </tr> 
     </table>        

  <!--列表开始-->
  <asp:GridView ID="GridView1" runat="server" Width="100%" DataKeyNames="ID" OnRowDataBound="GridView1_RowDataBound"
    ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"  PageSize="20" EmptyDataText="没搜索到相匹配的数据"  OnSorting="GridView1_Sorting"  BorderColor="#F9F9FB" BorderStyle="Dotted" GridLines="Vertical"  >        
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="#F9F9FB" />
    <RowStyle BackColor="#F9F9FB" ForeColor="#333333" Height="24px"  BorderStyle="Dotted" />
    <AlternatingRowStyle BackColor="#EFEFF8" />
    <HeaderStyle BackColor="#E3E7F0" Height="25px" />
        <PagerTemplate>
            <table width="100%" datapagesize="5">
                <tr>
                    <td width="70%" align="right">
                        <asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton>
                        <asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="linkBtnPrev" runat="server">上一页</asp:LinkButton>
                        <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="linkBtnNext" runat="server">下一页</asp:LinkButton>
                        <asp:LinkButton CommandName="Page" CommandArgument="Last" ID="linkBtnLast" runat="server">尾页</asp:LinkButton>
                        <asp:TextBox ID="txtGoPage" class="INPUT" runat="server" MaxLength="5" Width="15px"></asp:TextBox>
                        <asp:LinkButton ID="linkBtnGo" runat="server" OnClick="linkBtnGo_Click">跳转</asp:LinkButton>
                        <asp:Label ID="labMessage" runat="server" ForeColor="Red"></asp:Label></td>
                    <td width="30%" align="right">
                        <asp:Label ID="CurrentPageLabel" runat="server" ForeColor="Blue" Text="第1页 共5页 共89条"></asp:Label>
                    </td>
                </tr>
            </table>
        </PagerTemplate>
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <input id="check" runat="server" type="checkbox" value='<%# Eval("ID") %>' />
                </ItemTemplate>
                <HeaderTemplate>
                    <input id="checkAll" title="全选" onclick="javascript:CheckAll(this);" runat="server"
                        type="checkbox" />
                </HeaderTemplate>
                <ItemStyle Width="5%" HorizontalAlign="center"/>
            </asp:TemplateField>
            <asp:BoundField DataField="Code" HeaderText="编号" SortExpression="Code">
                <ItemStyle Width="10%" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name">
                <ItemStyle Width="25%" HorizontalAlign="Left" />
            </asp:BoundField>
        </Columns>
    </asp:GridView>
   <!--列表结束-->
   </td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>
